package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.bo.CommentBO;
import com.cskaoyan.bean.param.BaseParam;
import com.cskaoyan.bean.vo.*;
import com.cskaoyan.service.CommentService;
import com.cskaoyan.service.StatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author by WANGJun
 * @date 2022/6/5 22:24
 */
@RestController
@RequestMapping("admin/stat")
public class StatController {

    @Autowired
    StatService statService;

    @RequestMapping("user")
    public BaseRespVo user() {
        StatVO<StatUserVO> statVO = statService.user();
        return BaseRespVo.ok(statVO);
    }

    @RequestMapping("order")
    public BaseRespVo order() {
        StatVO<StatOrderVo> statVO = statService.queryOrder();
        return BaseRespVo.ok(statVO);
    }

    @RequestMapping("goods")
    public BaseRespVo goods() {
        StatVO<StatGoodsVo> statVO = statService.queryGoods();
        return BaseRespVo.ok(statVO);
    }

}
